package com.xssn.fjnd.user.api;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xssn.fjnd.entities.Member;
import com.xssn.fjnd.user.req.MemberREQ;
import com.xssn.fjnd.user.service.IMemberService;
import com.xssn.util.base.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(value = "前端线狮成员管理接口", description = "前端线狮成员管理接口，提供成员列表以及成员详细")
@RestController
@RequestMapping("/api/member")
public class ApiMemberController {

    @Autowired
    private IMemberService memberService;

    @ApiOperation("查询所有在职成员")
    @GetMapping("/getMemberList") // localhost:8001/content/photo/search
    public Result getMemberList() {
        return memberService.getMemberList();
    }

    @ApiOperation("查询线狮成员详情接口")
    @ApiImplicitParam(name = "id", value = "成员ID", required = true)
    @GetMapping("/{id}")
    public Result getMemberById(@PathVariable String id) {

        return memberService.getMemberById(id);
    }

}
